package com.new_wear.project.system.rules.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.new_wear.project.system.rules.mapper.CstUserIntegralRulesMapper;
import com.new_wear.project.system.rules.domain.CstUserIntegralRules;
import com.new_wear.project.system.rules.service.ICstUserIntegralRulesService;
import com.new_wear.common.utils.text.Convert;

/**
 * 用户 - 等级积分规则Service业务层处理
 * 
 * @author new_wear
 * @date 2020-01-07
 */
@Service
public class CstUserIntegralRulesServiceImpl implements ICstUserIntegralRulesService 
{
    @Autowired
    private CstUserIntegralRulesMapper cstUserIntegralRulesMapper;

    /**
     * 查询用户 - 等级积分规则
     * 
     * @param id 用户 - 等级积分规则ID
     * @return 用户 - 等级积分规则
     */
    @Override
    public CstUserIntegralRules selectCstUserIntegralRulesById(Long id)
    {
        return cstUserIntegralRulesMapper.selectCstUserIntegralRulesById(id);
    }

    /**
     * 查询用户 - 等级积分规则列表
     * 
     * @param cstUserIntegralRules 用户 - 等级积分规则
     * @return 用户 - 等级积分规则
     */
    @Override
    public List<CstUserIntegralRules> selectCstUserIntegralRulesList(CstUserIntegralRules cstUserIntegralRules)
    {
        return cstUserIntegralRulesMapper.selectCstUserIntegralRulesList(cstUserIntegralRules);
    }

    /**
     * 新增用户 - 等级积分规则
     * 
     * @param cstUserIntegralRules 用户 - 等级积分规则
     * @return 结果
     */
    @Override
    public int insertCstUserIntegralRules(CstUserIntegralRules cstUserIntegralRules)
    {
        return cstUserIntegralRulesMapper.insertCstUserIntegralRules(cstUserIntegralRules);
    }

    /**
     * 修改用户 - 等级积分规则
     * 
     * @param cstUserIntegralRules 用户 - 等级积分规则
     * @return 结果
     */
    @Override
    public int updateCstUserIntegralRules(CstUserIntegralRules cstUserIntegralRules)
    {
        return cstUserIntegralRulesMapper.updateCstUserIntegralRules(cstUserIntegralRules);
    }

    /**
     * 删除用户 - 等级积分规则对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCstUserIntegralRulesByIds(String ids)
    {
        return cstUserIntegralRulesMapper.deleteCstUserIntegralRulesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户 - 等级积分规则信息
     * 
     * @param id 用户 - 等级积分规则ID
     * @return 结果
     */
    @Override
    public int deleteCstUserIntegralRulesById(Long id)
    {
        return cstUserIntegralRulesMapper.deleteCstUserIntegralRulesById(id);
    }
}
